package com.koron.css2.newProjectCenter.mapper;

import com.koron.css2.newProjectCenter.bean.PjProcessNodeTimePostponeBean;
import com.koron.css2.newProjectCenter.bean.query.PjTimePostponeQueryBean;
import com.koron.css2.newProjectCenter.vo.PjProcessNodeTimePostponeListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PjProcessNodeTimePostponeMapper {
	
	/**
	 * 查询延期列表详情
	 */
	PjProcessNodeTimePostponeListVO selectDetailsById(String id);
	
	/**
	 * 工程延期查询列表
	 * @param query
	 * @return
	 */
	List<PjProcessNodeTimePostponeListVO> selectList(PjTimePostponeQueryBean query);
	
	/**
	 * 用户工程节点延期申请查询
	 * @param id
	 * @return
	 */
	PjProcessNodeTimePostponeBean selectById(String id);
	
	/**
	 * 通过工程外键查询用户工程节点延期
	 * @param id
	 * @return
	 */
	PjProcessNodeTimePostponeBean selectByPjId(String id);
	
	/**
	 * 用户工程节点延期申请插入
	 * @param id
	 * @return
	 */
	int insert(PjProcessNodeTimePostponeBean processNodeTimePostpone);

	List<PjProcessNodeTimePostponeBean> getListByPjId(String pjId);
	
	/**
	 * 通过主键删除
	 * @param id
	 * @return
	 */
	int deleteById(String id);

	void deleteByBillId(String pjInfoId);

    void batchInsert(@Param("beanList") List<PjProcessNodeTimePostponeBean> beanList);

	Integer sumUsedByPjId(String id);

	PjProcessNodeTimePostponeBean getOneByPjIdAndProcessState(@Param("pjId") String pjId, @Param("state") String state);
}
